Skip to content

java_static_lifetime_init: Deterministic order of initialisation #6093

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 25, 2021

Conversation

tautschnig
Copy link
Collaborator

Much like the C front-end, ensure that the collection of objects of
static lifetime is initialised in a fixed order, based on their names.
Previously, the (unspecified) order in an unordered set and unordered
map determined the sequence of instructions being generated, which
resulted in jdiff regression tests sometimes failing. Those failures
were caused by __CPROVER_initialize sometimes showing up among the list
of goto functions that differed.

The functional change is the second commit, the first just does the refactoring to make the second commit as small (and as easy to review) as possible.

  • Each commit message has a non-empty body, explaining why the change was made.
  • Methods or procedures I have added are documented, following the guidelines provided in CODING_STANDARD.md.
  • n/a The feature or user visible behaviour I have added or modified has been documented in the User Guide in doc/cprover-manual/
  • Regression or unit tests are included, or existing tests cover the modified code (in this case I have detailed which ones those are in the commit message).
  • n/a My commit message includes data points confirming performance improvements (if claimed).
  • My PR is restricted to a single feature or bugfix.
  • n/a White-space or formatting changes outside the feature-related changed lines are in commits of their own.

@codecov
Copy link

codecov bot commented May 8, 2021

Codecov Report

Merging #6093 (3258d81) into develop (c4deb56) will increase coverage by 0.00%.
The diff coverage is 92.42%.

Impacted file tree graph

@@           Coverage Diff            @@
##           develop    #6093   +/-   ##
========================================
  Coverage    75.98%   75.99%           
========================================
  Files         1524     1524           
  Lines       164244   164249    +5     
========================================
+ Hits        124809   124814    +5     
  Misses       39435    39435           
Impacted Files Coverage Δ
jbmc/src/java_bytecode/java_entry_point.cpp 89.52% <92.42%> (+0.16%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 62dc70a...3258d81. Read the comment docs.

No change in behaviour, just moving the large loop body to a function of
its own.
Much like the C front-end, ensure that the collection of objects of
static lifetime is initialised in a fixed order, based on their names.
Previously, the (unspecified) order in an unordered set and unordered
map determined the sequence of instructions being generated, which
resulted in jdiff regression tests sometimes failing. Those failures
were caused by __CPROVER_initialize sometimes showing up among the list
of goto functions that differed.
@tautschnig
Copy link
Collaborator Author

@peterschrammel Ping?

@tautschnig tautschnig merged commit 9892924 into diffblue:develop Oct 25, 2021
@tautschnig tautschnig deleted the java_static_init branch October 25, 2021 17:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants